package com.muqi.app.im.adapter;

import java.util.List;

import android.content.Context;
import android.widget.BaseAdapter;

public abstract class DefaultAdapter<T> extends BaseAdapter {
	public Context context;
	public List<T> listData;

	public DefaultAdapter(Context context, List<T> listData) {
		this.context = context;
		this.listData = listData;
	}

	@Override
	public int getCount() {
		return listData == null ? 0 : listData.size();
	}

	@Override
	public T getItem(int position) {
		return listData.get(position);
	}
   
	@Override
	public long getItemId(int position) {
		return position;
	}
	
}
